<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="./../template/AdminTemplate.xhtml">

    <ui:define name="contentInsert">
        
        <h3>Delete Advertisement</h3>
        <br/>
        <br/>
        <h:form>
            Input Customer Email: <h:selectOneMenu value="#{advertisementMB.stakeholderName}"> 
                                        <f:selectItems value="#{stakeholderAccountsManagerBean.getNamesOfAllStakeholders()}"/>
                                  </h:selectOneMenu> <p:commandButton value="Search" ajax="false" />
            
            <p:dataTable value="#{advertisementMB.retrieveAdvertisement2()}" var="o" paginator="true" rows="25" emptyMessage="Nothing to display.">


                        <p:column>
                            <f:facet name="header">Advertisement ID</f:facet>
                            #{o.id}
                        </p:column>

                        <p:column>
                            <f:facet name="header">Title</f:facet>
                            #{o.title}
                        </p:column>

                        <p:column>
                            <f:facet name="header">Start Date</f:facet>
                            #{o.startDate}
                        </p:column>

                        <p:column>
                            <f:facet name="header">End Date</f:facet>
                            #{o.endDate}
                        </p:column>
                
                        <p:column style="width: 50px">                    
                            <p:commandButton value="Deactivate" action="#{advertisementMB.deActivate(o)}" ajax="false"/>
                        </p:column>
                           
            </p:dataTable>
            
        </h:form>
        <br/>
        <h5>Subheading</h5>
        Text
        <br/>
        <br/>
        <br/>
        

    </ui:define>
</ui:composition>